package com.mt.channel.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mt.channel.api.service.IChannelOrderService;
import com.mt.channel.entity.ChannelOrderEntity;
import com.mt.common.PagerInfo;
import com.mt.common.ServiceResult;
@CrossOrigin
@RestController
public class ChannelOrderController {
    @Autowired
    IChannelOrderService channelOrderService;

    @GetMapping("/channelOrder/findList")
    public ServiceResult<List<ChannelOrderEntity>> findList(Map<String, Object> params, PagerInfo<?> pagerInfo) {
        return channelOrderService.findList(params, pagerInfo);
    }

    @GetMapping("/channelOrder/findInfo")
    public ServiceResult<ChannelOrderEntity> findInfo(Map<String, Object> params) {
        return channelOrderService.findInfo(params);
    }

    @PostMapping("/channelOrder/doInsert")
    public ServiceResult<Integer> doInsert(ChannelOrderEntity channelOrderEntity) {
        return channelOrderService.doInsert(channelOrderEntity);
    }
}
